<form class="layui-form" lay-filter="form" id="form">
    <div class="layui-form-item">
        <label class="layui-form-label label-required-next">名称</label>
        <div class="layui-input-block">
            <input type="text" name="title" lay-verify="required" lay-reqText="名称不能为空" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label label-required-next">类型</label>
        <div class="layui-input-block">
            <input type="radio" name="input_type" value="radio" title="单选" checked="">
            <input type="radio" name="input_type" value="select" title="下拉框">
            <input type="radio" name="input_type" value="checkbox" title="多选">
            <input type="radio" name="input_type" value="text" title="文本框">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label label-required-next">类型</label>
        <div class="layui-input-block">
            <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/goods/category/select_all" lay-done="layui.form.render();">
                <select name="category_id" lay-search="" lay-verify="required" lay-reqText="请选择分类">
                    <option value=""></option>
                    {{# layui.each(d.data, function(index, item){ }}
                    <option value="{{ item.id }}" {{# if(item.children){ }}disabled{{# } }}{{# if(item.id== d.params.category_id){ }}selected{{# } }}>{{ item.title }}</option>
                    {{# if(item.children){ }}
                    {{# layui.each(item.children, function(index1, item1){ }}
                    <option value="{{ item1.id }}" {{# if(item1.children){ }}disabled{{# } }}{{# if(item1.id== d.params.category_id){ }}selected{{# } }}>|--{{ item1.title }}</option>
                    {{# if(item1.children){ }}
                    {{# layui.each(item1.children, function(index2, item2){ }}
                    <option value="{{ item2.id }}" {{# if(item2.id== d.params.category_id){ }}selected{{# } }}>|--|--{{ item2.title }}</option>
                    {{# }); }}
                    {{# } }}
                    {{# }); }}
                    {{# } }}
                    {{# }); }}
                </select>
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <input type="text" name="note" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="position" value="999" lay-verify="number" lay-reqText="排序不只能是数字" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="hidden" name="id" value="">
            <input type="button" lay-submit lay-filter="form-submit" value="确认" class="layui-btn">
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>